﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>商品信息</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"  href="${ctx }/plugin/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="${ctx }/css/b2c.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="${ctx }/plugin/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="${ctx }/plugin/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="${ctx }/js/cart.js"></script>
<script src="${ctx }/js/user.js"></script>

</head>
<body>
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<div class="page-header">
					<h1>
						B2C网上商城 <small>Online Shopping Mall</small>
					</h1>
				</div>
				<!-- 轮播图 -->
				<%@ include file="carousel.jsp" %>
				<hr />
				<!-- 导航栏 -->
				<jsp:include page="nav.jsp"></jsp:include>
			</div>
		</div>
		<hr>
		<div class="row clearfix">
			<!-- 商品分类 -->
			<%@ include file="category.jsp" %>
			
			<div class="col-md-10 column">
				<div class="panel panel-info">
					<div class="panel-heading">
							${product.name} - 详细信息</div>		
					<div class="panel-body">				
					</div>
					 <!-- List group -->
					  <ul class="list-group">
					    <li class="list-group-item">${product.description} </li>
					    <li class="list-group-item">
					    		<img src="${ctx }/upload/${product.img}"
									style="width: 121px; height: 121px"
									class="img-rounded img-responsive" alt="" />			    
					    </li>
					    <li class="list-group-item">￥ ${product.price}  
				    		<button type="button" class="btn btn-link  popover-show"
										title="" data-container="body" 
										data-toggle="popover" 
										data-content="成功加入到购物车 !"										
										onclick="addCart(${product.id},this)">购买</button>	
					    </li>					   
					  </ul>
				</div>
			</div>
		</div>
	</div>
</body>
</html>